Visual Basic (Declaration) | |
---|---|
Public Overloads Shared Function Equals( _ ByVal ar1() As Byte, _ ByVal ar2() As Byte _ ) As Boolean |
Parameters
- ar1
- ar2
Library/Library.Test/TestBinaryComparer.cs
C# | Copy Code |
---|---|
Assert.IsTrue(BinaryComparer.Equals(null, null)); Assert.IsTrue(BinaryComparer.Equals(new byte[] { }, new byte[] { })); Assert.IsTrue(BinaryComparer.Equals(new byte[] { 1, 2, 3 }, new byte[] { 1, 2, 3 })); Assert.IsFalse(BinaryComparer.Equals(null, new byte[] { 1, 2, 3 })); Assert.IsFalse(BinaryComparer.Equals(new byte[] { 1, 2, 3 }, null)); Assert.IsFalse(BinaryComparer.Equals(new byte[] { 1, 2 }, new byte[] { 1, 2, 3 })); Assert.IsFalse(BinaryComparer.Equals(new byte[] { 1, 2, 3 }, new byte[] { 1, 2 })); |
VB.NET | Copy Code |
---|---|
Assert.IsTrue(BinaryComparer.Equals(Nothing, Nothing)) Assert.IsTrue(BinaryComparer.Equals(New Byte() {}, New Byte() {})) Assert.IsTrue(BinaryComparer.Equals(New Byte() {1, 2, 3}, New Byte() {1, 2, 3})) Assert.IsFalse(BinaryComparer.Equals(Nothing, New Byte() {1, 2, 3})) Assert.IsFalse(BinaryComparer.Equals(New Byte() {1, 2, 3}, Nothing)) Assert.IsFalse(BinaryComparer.Equals(New Byte() {1, 2}, New Byte() {1, 2, 3})) Assert.IsFalse(BinaryComparer.Equals(New Byte() {1, 2, 3}, New Byte() {1, 2})) |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
BinaryComparer ClassBinaryComparer Members
Overload List